OUT=a.out
OUT_DEBUG=a.debug
CC=gcc
CFLAGS+=-c -o
OBJS=$(patsubst %.c,%.o,$(wildcard *.c))

all:${OBJS}
	${CC} -o ${OUT} $^

%.o:%.c
	${CC} ${CFLAGS} $@ $^

clean:
	${RM} ${OBJS} ${OUT}

print:
	@echo ${OBJS}

debug:
	${CC} -g *.c -o ${OUT_DEBUG} 
